//
//  LHBaseViewController.m
//  LHProjectShell
//
//  Created by liuhao on 2018/12/7.
//  Copyright © 2018 liuhao. All rights reserved.
//

#import "LHBaseViewController.h"
@interface LHBaseViewController ()
@end

@implementation LHBaseViewController
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    [self.navigationController.navigationBar setHidden:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
     self.view.backgroundColor = [UIColor grayColor];
    LHNavgationView*  lh_nav = [[LHNavgationView alloc]init];
    if (self.navigationController.viewControllers.count>1) {
        lh_nav.isHideBackButton = NO;
    }else{
        lh_nav.isHideBackButton = YES;
    }
    
    [self.view addSubview:lh_nav];
    //赋值给外步只读属性供子类修改
    [self setValue:lh_nav forKey:NSStringFromSelector(@selector(lh_nav))];
}

-(void)sub_leftAction{
    [self.navigationController popViewControllerAnimated:YES];
};

@end
